package com.bdq.basic.infrastructure.persistence.mysql.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bdq.basic.infrastructure.persistence.mysql.pojo.BaseCategory;
import com.bdq.basic.infrastructure.persistence.mysql.service.BaseCategoryService;
import com.bdq.basic.infrastructure.persistence.mysql.mapper.BaseCategoryMapper;
import com.bdq.common.enums.YesOrNoEnum;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author malei
* @description 针对表【base_category(基础分类表)】的数据库操作Service实现
* @createDate 2024-05-10 11:20:32
*/
@Service
public class BaseCategoryServiceImpl extends ServiceImpl<BaseCategoryMapper, BaseCategory>
    implements BaseCategoryService{

    @Override
    public List<BaseCategory> getByChannel(Integer channel) {
        return lambdaQuery()
                .eq(BaseCategory::getChannel, channel)
                .eq(BaseCategory::getIsDeleted, YesOrNoEnum.NO.getCode())
                .list();
    }
}




